﻿<controls:ChildWindow xmlns:my2="clr-namespace:SLControls.Controls;assembly=SLControls"  x:Class="VAdvantage.Framework.AttachmentForm"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="608" Height="519" 
           Title="Attachment" xmlns:my="clr-namespace:VAdvantage.Controls" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" xmlns:my1="clr-namespace:VAdvantage.Panels">

    <Grid>
        <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <my:VTabControl x:Name="vTabAttachment" >
                <controls:TabItem Header="File Attachment" Name="tabItem1">
                    <Grid Background="Transparent">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="207" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                            <!--<RowDefinition Height="*" />-->
                        </Grid.RowDefinitions>
                        <my:VLabel HorizontalAlignment="Left" Margin="0" x:Name="lblAttached" VerticalAlignment="Center" Content="Attachecd File" FontStyle="Italic" FontSize="11" FontWeight="Normal" FontStretch="ExtraExpanded" />
                        <my:VComboBox Grid.Row="1" x:Name="vcmbFileNames" Margin="0,1,1,0" SelectionChanged="vcmbFileNames_SelectionChanged" />
                        <toolkit:WrapPanel Grid.Row="2" Name="wrapPanel1" Background="AliceBlue" Margin="3">
                            <my:VLabel x:Name="vlblInfo" />
                            <Image x:Name ="image" Stretch="None"></Image>
                        </toolkit:WrapPanel>
                        <Button Grid.Row="3" Height="30" HorizontalAlignment="Left" Margin="1,1,0,1" Name="ibtnDeleteAll" VerticalAlignment="Top" Width="35" Click="ibtnDeleteAll_Click"  >
                            <Image  Stretch="Fill"  Source="/VAdvantage;component/Images/delete-all.png"  />
                        </Button>
                        <CheckBox x:Name="chkFileSystem" Content="Save in FileSystem" Grid.Row="3"  HorizontalAlignment="Center" VerticalAlignment="Center" IsThreeState="False" ></CheckBox>
                        <Button Grid.Row="3" Height="30" HorizontalAlignment="Right" Margin="0,1,82,1" Name="ibtnLoad" VerticalAlignment="Top" Width="35" Click="ibtnLoad_Click">
                            <Image  Stretch="Fill"  Source="/VAdvantage;component/Images/upload.png"  />
                        </Button>
                        <Button Grid.Row="3" Height="30" HorizontalAlignment="Right"  Margin="0,1,41,0" Name="ibtnSave" VerticalAlignment="Top" Width="35" Click="ibtnSave_Click">
                            <Image  Stretch="Fill"  Source="/VAdvantage;component/Images/download.png"  />
                        </Button>
                        <Button Grid.Row="3" Height="30" Visibility="Collapsed"  HorizontalAlignment="Right" Margin="0,1,41,0" Name="ibtnOpen" VerticalAlignment="Top" Width="35" Click="ibtnOpen_Click" >
                            <Image Stretch="Fill"  Source="/VAdvantage;component/Images/read.png"  />
                        </Button>
                        <Button  Grid.Row="3" Height="30" HorizontalAlignment="Right" Name="ibtnDelete" VerticalAlignment="Top" Width="35" Margin="0,1" Click="ibtnDelete_Click" >
                            <Image Stretch="Fill"  Source="/VAdvantage;component/Images/delete_attachment.png"  />
                        </Button>
                        <sdk:Label Grid.Row="4" HorizontalAlignment="Left" Margin="0" Name="lblComment" VerticalAlignment="Top" Content="Comment" FontStyle="Italic" />
                        <my:VTextBox Grid.Row="5" VerticalAlignment="Stretch" Height="100"  AcceptsReturn="True" Multiline="True"  x:Name="vtxtDesc" />
                        <Button Grid.Row="6" Height="35" HorizontalAlignment="Right" Margin="105,0,40,4" Name="btnCancel" VerticalAlignment="Bottom" Width="35" >
                            <Image Margin="0,0,0,0" Source="/VAdvantage;component/Images/cancel_up.png" Stretch="Fill" HorizontalAlignment="Left"  Grid.Column="1" />
                        </Button>
                        <Button Grid.Row="6" Height="35" HorizontalAlignment="Right" Margin="147,0,0,5" Name="btnOk"  VerticalAlignment="Bottom" Width="35" >
                            <Image Margin="0,0,0,0"  Source="/VAdvantage;component/Images/right_up.png" Stretch="Fill"  FlowDirection="LeftToRight" Grid.Column="1" HorizontalAlignment="Right" />
                        </Button>
                    </Grid>
                </controls:TabItem>
                <controls:TabItem Header="Inbox Mail Attchment">
                    <Grid Background="Transparent">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <!--<sdk:DataGrid AutoGenerateColumns="False" Name="vdgvInboxMail" Background="#90DEDCE5" Grid.Row="0"  HorizontalGridLinesBrush="#FFE9EFEF" RowBackground="#FFBABABD" />-->
                        <my2:VDataGrid AutoGenerateColumns="False" Name="vdgvInboxMail" Background="#90DEDCE5" Grid.Row="0"  HorizontalGridLinesBrush="#FFE9EFEF" RowBackground="#FFBABABD" />
                        <my2:VImage Name="btninbox" Height="35" Width="35" Grid.Row="1" HorizontalAlignment="Right" Margin="0,5,5,5" Icon="/VAdvantage;component/Images/ok-login.png" Click="VImage_Click">

                        </my2:VImage>
                    </Grid>
                </controls:TabItem>
                <controls:TabItem Header="Sent MAil Attachment">
                    <Grid Background="Transparent">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <!--<sdk:DataGrid AutoGenerateColumns="False" Name="vdgv" Background="#90DEDCE5" Grid.Row="0" ColumnWidth="145" HorizontalGridLinesBrush="#FFE9EFEF" RowBackground="#FFBABABD"/>-->
                        <my2:VDataGrid  AutoGenerateColumns="False" Name="vdgv" Background="#90DEDCE5" Grid.Row="0" ColumnWidth="145" HorizontalGridLinesBrush="#FFE9EFEF" RowBackground="#FFBABABD"/>
                        <my2:VImage Name="btnSent" Height="35" Width="35" Grid.Row="1" HorizontalAlignment="Right" Margin="0,5,5,5" Icon="/VAdvantage;component/Images/ok-login.png" Click="VImage_Click">

                        </my2:VImage>
                    </Grid>

                </controls:TabItem>
                <controls:TabItem Header="Letter Attachment">

                    <Grid Background="Transparent">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <!--<sdk:DataGrid AutoGenerateColumns="False" Name="vdgvLetterAttachment" Background="#90DEDCE5" Grid.Row="0" ColumnWidth="260" HorizontalGridLinesBrush="#FFE9EFEF" RowBackground="#FFBABABD"></sdk:DataGrid>-->
                        <my2:VDataGrid AutoGenerateColumns="False" Name="vdgvLetterAttachment" Background="#90DEDCE5" Grid.Row="0" ColumnWidth="260" HorizontalGridLinesBrush="#FFE9EFEF" RowBackground="#FFBABABD"></my2:VDataGrid>
                        <my2:VImage Name="btnLetter" Height="35" Width="35" Grid.Row="1" HorizontalAlignment="Right" Margin="0,5,5,5" Icon="/VAdvantage;component/Images/ok-login.png" Click="VImage_Click">

                        </my2:VImage>
                    </Grid>
                </controls:TabItem>
                <controls:TabItem Header="Appointments">
                    <Grid Background="Transparent">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <!--<sdk:DataGrid AutoGenerateColumns="False" Name="vdgvApp" Background="LightGray" />-->
                        <my2:VDataGrid AutoGenerateColumns="False" Name="vdgvApp" Background="LightGray" />
                        <my2:VImage Name="btnAppointment" Height="35" Width="35" Grid.Row="1" HorizontalAlignment="Right" Margin="0,5,5,5" Icon="/VAdvantage;component/Images/ok-login.png" Click="VImage_Click"/>
                    </Grid>

                </controls:TabItem>
            </my:VTabControl>
        </Grid>
        <Grid Background="LightGray" x:Name="busyWindow" Opacity=".4" MouseLeftButtonDown="busyWindow_MouseLeftButtonDown">
            <TextBlock x:Name="txtBusy" FontSize="16" Text="Processing.." VerticalAlignment="Center" HorizontalAlignment="Center"
                        FontStyle="Italic"></TextBlock>
        </Grid>
    </Grid>
</controls:ChildWindow>